<?php
namespace app\admin\validate;

use think\Validate;
use think\Db;
class SchoolRollValidate extends Validate
{
	protected $rule = [
        ['source', 'require', '请选择变动原因'],
        // ['to_class', 'require', '请选转至班级'],
		['to_batch', 'require', '请选转至批次'],
		['to_major_id', 'require', '请选转至专业'],
		['to_school_id', 'require', '请选转至学校'],
		['money','require|min_money','请输入金额|请输入有效金额'],
    ];

	protected function min_money($value){
		if($value<0){
			return false;
		}else{
			return true;
		}
	}
}
